Part Number Hot Search : 
1N5915 MOCD217M RFP6N50 2SC514 T25C6 TK71525S T25C6 PD414
Product Description
Full Text Search
 

To Download PCF84CXXXA Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  d a t a sh eet product speci?cation supersedes data of may 1994 file under integrated circuits, ic14 1996 nov 22 integrated circuits PCF84CXXXA family 8-bit microcontrollers
1996 nov 22 2 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family contents 1 introduction 2 features 3 general description 4 block diagram 5 pinning information 5.1 pinning 5.2 pin description 6 functional description 6.1 central processing unit 6.2 program memory 6.3 data memory 6.3.1 working registers 6.3.2 program counter stack 6.4 program counter 6.5 program status word 6.6 interrupts 6.6.1 external interrupt 6.6.2 i 2 c-bus/derivative interrupt 6.6.3 timer/event counter interrupt 6.7 timer/event counter 1 6.7.1 test 1/count input (t1) 6.8 parallel ports 6.9 i 2 c-bus interface 6.9.1 data shift register (s0) 6.9.2 address register (s0) 6.9.3 clock control register (s2) 6.9.4 status register (s1) 6.10 timing 6.11 oscillator 6.12 reset 6.12.1 passive external reset 6.12.2 active external reset 6.12.3 internal reset 6.12.4 reset state 6.13 reduced power modes 6.13.2 stop mode 6.14 derivative logic 7 instruction set 7.1 instruction map 8 definitions 9 life support applications 10 purchase of philips i 2 c components
1996 nov 22 3 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 1 introduction this data sheet describes the shared properties of the PCF84CXXXA family of microcontrollers. the family currently consists of: pcf84c00 pcf84c12a; 22a; 42a pcf84c21a; 41a; 81a pcf84c85a pcf84c122; 222; 422; 622; 822 pcf84c44x; 64x; 84x pcf84c846. for a particular microcontroller, this data sheet should be read in conjunction with the individual data sheet of the specific device. data sheets can be found in data handbook ic14, 8048-based 8-bit microcontrollers . the pcd33xxa family of microcontrollers has similar characteristics to the PCF84CXXXA family, but with lower minimum operating voltage, dtmf/modem/musical tone generation and (for most devices) on-chip eeprom. this family should be considered for telecom-specific applications. please refer to the pcd33xxa family data sheet. 2 features 8-bit cpu, rom, ram, i/o all in one package up to 8 kbytes rom up to 256 bytes ram over 100 instructions (based on mab8048) all of 1 or 2 cycles 8 or more quasi-bidirectional i/o port lines 8-bit programmable timer/event counter 1 2 or 3 single-level vectored interrupts: external, timer/event counter, (i 2 c-bus/derivative) two test inputs, one of which also serves as the external interrupt input i 2 c-bus serial data interface (most devices) derivative logic (most devices) power-on-reset, stop and idle modes supply voltage range: 2.5 to 6 v clock frequency: 1 to 16 mhz operating temperature: - 40 to +85 c manufactured in silicon gate cmos process. 3 general description the PCF84CXXXA family of microcontrollers provide up to 8 kbytes of program memory and up to 256 bytes of ram. all devices include flexible i/o ports, an 8-bit programmable timer/event counter and a choice of single-level vectored interrupts. most devices feature i 2 c-bus compatibility. the instruction set is based on that of the well-known mab8048. some of the devices have functional equivalents in the mab84xx family of nmos controllers. where the lower power consumption and higher speed of cmos provide advantages, the PCF84CXXXA devices can be used as direct replacements for their mab84xx equivalents. a range of prototyping devices with external program memory and piggy-backs, as well as emulation probes and prototyping systems are available.
1996 nov 22 4 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 4 block diagram handbook, full pagewidth mba283 - 2 higher program counter (5) lower program counter (8) program status word timer/ event counter (8) i 2 c-bus interface derivative logic memory bank flip-flops port 1 flip-flops port 1 buffer port 0 flip-flops port 0 buffer 32 t1 internal clock freq. 30 resident rom up to 8 kbytes decode port 2 flip-flops port 2 buffer p1.7 to p1.0 sda/p2.3 p2.2 to p2.0 data clock sclk 84 8 85 8 878 8 8 p0.7 to p0.0 ram address register (8) accumulator (8) temporary register 2 (8) temporary register 1 (8) inter - rupt logic arithmetic logic unit instruction register & decoder timer interrupt sio / derivative interrupt decimal adjust control & timing xtal 2 xtal 1 reset int / t0 stop idle interrupt initialize oscillator xtal external interrupt conditional branch logic int / t0 t1 timer flag carry acc acc bit test resident ram array up to 256 bytes multiplexer 8-level stack (variable length) optional second register bank data store d e c o d e register 0 register 1 register 2 register 3 register 4 register 5 register 6 register 7 13 3 power supply v dd v ss gnd power on reset v por reset = type dependent fig.1 block diagram.
1996 nov 22 5 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 5 pinning information 5.1 pinning for individual pinning configurations consult the data sheet of the specific device. 5.2 pin description table 1 describes the common functions of the devices. for full details of pin descriptions consult the data sheet of the specific device. table 1 common functions symbol type description v ss p ground v dd p positive supply voltage xtal1 i crystal oscillator/external clock input xtal2 o crystal oscillator output reset i reset input int/t0 i interrupt/test 0 input t1 i test 1/count input of 8-bit timer/event counter 1 p0.0 to p0.7 i/o port 0: quasi-bidirectional i/o lines p1.0 to p1.7 i/o port 1: quasi-bidirectional i/o lines p2.0 to p2.2 i/o port 2: quasi-bidirectional i/o lines sda/p2.3 i/o bidirectional data line of the i 2 c-bus interface/port 2: quasi-bidirectional i/o line sclk i/o bidirectional clock line of the i 2 c-bus interface
1996 nov 22 6 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6 functional description 6.1 central processing unit the PCF84CXXXA family provides an instruction set with arithmetic, logic, branching, input/output and control facilities. special highlights are the instructions for bcd arithmetic, nibble handling, conditional branches, loop control (djnz) and table look-up (movp). code and execution efficiency is achieved by using a maximum of two bytes and two execution cycles per instruction (see chapter 7). 6.2 program memory the program memory consists of up to 8 kbytes of read-only memory (rom). each location is directly addressable by the program counter. the program memory is mask-programmed at the factory. figure 2 illustrates the program memory map. four program memory locations are of special importance: location 0: first instruction to be executed after the processor is reset location 3: first instruction of an external interrupt ( int/t0) routine location 5: first instruction of a i 2 c-bus/derivative interrupt routine location 7: first instruction of a timer/event counter interrupt routine. only 11 bits of the 13-bit program counter function as a counter. the two most significant bits can only be preset. the program memory is therefore, structured into banks of 2 kbytes. transfer of control to other memory banks is performed by unconditional branches (jmp) or subroutine calls (call) when another memory bank has been pre-selected (by sel mb instruction). each program memory bank is further divided into 8 pages of 256 bytes. indirect (jmpp) and conditional branches cannot cross page boundaries. 6.3 data memory data memory consists of up to 256 bytes of random access memory (ram). all locations are indirectly addressable using ram pointer registers. up to 16 register locations are directly addressable. data memory also includes an 8-level program counter stack addressed by a 3-bit stack pointer. all ram locations make efficient program loop counters if used with the decrement register and test instruction (djnz). figure 3 illustrates the data memory map. 6.3.1 w orking registers locations 0 to 7 are working registers. they are accessible by efficient one byte/one cycle instructions, thus making these locations suitable for frequently accessed intermediate results. as an alternative to locations 0 to 7, locations 24 to 31 may be used as working registers. register bank selection is made by sel rb0/rb1 instructions. register bank 1 may be used as an extension of register bank 0, as an alternative register bank for interrupt service or as general purpose data memory. the first two locations of each bank (r0, r1, r0 and r1) serve as ram pointers that indirectly address all ram locations. 6.3.2 p rogram c ounter stack locations 8 to 23 may be used as an 8-level program counter stack reserving 2 locations per level, or as general purpose ram. the stack (see fig.5) saves return addresses and status during interrupt or subroutine servicing. nesting of subroutines and/or interrupts is permitted up to 8-levels deep. the 3-bit stack pointer always points to the next free stack level. following device reset, the stack pointer points to level 0 (locations 8 and 9). on each subroutine call (call) or interrupt, the contents of the program counter and bits 4, 6 and 7 of the program status word are transferred to the level indicated by the stack pointer. the stack pointer increments and points to the next free level. overflow from level 7 to level 0 occurs after nesting eight levels deep. further subroutine calls and/or interrupts must not occur at this stage since this would result in loss of program content; overriding level 0 content. return from interrupt must be performed by the retr instruction, which decrements the stack pointer and restores the program counter and program status word, valid before the interrupt occurred. return from subroutine should be performed by the ret instruction. in contrast to retr, ret does not restore the program status word. as a general rule, the use of retr in conjunction with a subroutine call is not recommended. the use of retr must also be avoided with subroutines called from interrupt routines because it prematurely terminates the interrupt state (see section 6.6).
1996 nov 22 7 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family handbook, halfpage mba284 8 7 6 5 4 3 2 1 0 location 7: timer/event counter interrupt vector location 5: sio/derivative interrupt vector location 3: external interrupt vector location 0: reset vector 1024 1023 8191 6143 4095 2048 2047 sel mb3 sel mb2 sel mb1 sel mb0 fig.2 program memory map. fig.3 data memory map. mla616 r0 r1 0 1 directly addressable when bank 0 is selected bank 0 working registers 8 x 8 7 8 23 24 25 r0' r1' directly addressable when bank 1 is selected bank 1 working registers 8 x 8 31 32 63 64 127 128 255 addressed indirectly through pointers r0, r1, r0', r1' 8-level stack or user ram 16 x 8 user ram fig.4 program status word. handbook, halfpage mla617 sp 2 rbs ps sp 1 sp 0 1 ac cy 76543 21 0 msb lsb saved in the stack saved in the stack stack pointer
1996 nov 22 8 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.4 program counter the 13-bit program counter is able to address up to 8 kbytes of rom (see fig.6). 11 bits (pc0 to pc10) are auto-incrementing. the two most significant bits (pc11 and pc12) must be changed under program control by sel mb followed by a jmp or call instruction. 6.5 program status word the program status word (psw) is an 8-bit register in the cpu which stores information about the current status of the microcontroller (see fig.4). the psw bits are: bits 0 to 2: stack pointer bits (sp0, sp1, sp2) bit 3: timer prescaler select (ps); 0 = modulo-32, 1 = modulo-1 (no prescaling) bit 4: working register bank select (rbs); 0 = register bank 0, 1 = register bank 1 bit 5: not used (fixed at 1) bit 6: auxiliary carry (ac); half-carry bit generated by an add instruction and used by the decimal adjust instruction da a bit 7: carry (cy); the carry flag indicates that the previous operation resulted in an overflow of the accumulator. all bits can be read using the mov a, psw instruction. bits 0, 1 and 2 are affected by call, ret, retr and interrupts. bit 3 can be controlled by mov psw, a and bit 4 by sel rb instructions. bit 6 is set and cleared as a side-effect of add and addc instructions. bit 7 is affected by add, addc, da, rlc, rrc, clr c and cpl c instructions. fig.5 program counter stack. handbook, halfpage mea030 lsb 20 8 9 10 11 12 13 14 15 16 17 18 19 21 22 23 stack pointer 111 110 101 011 010 001 000 100 msb 8 pc 9 pc 10 pc 11 pc 7 pc 6 pc 5 pc 4 pc 3 pc 2 pc 1 pc 0 pc psw 7 12 pc psw 6 psw 4 data memory location fig.6 program counter. handbook, full pagewidth mla694 pc 12 pc 11 pc 10 pc 9 pc 8 pc 7 pc 6 pc 5 pc 4 pc 3 pc 2 pc 1 pc 0 conventional program counter counts 000h to 7ffh overflows 7ffh to 000h jmp or call instructions transfer the contents of internal flipflop mbff0 to pc and mbbf1 to pc 11 12 (mbff0) 0 by selmb0 (mbff1) 0 (mbff0) 0 by selmb1 (mbff1) 0 (mbff0) 0 by selmb2 (mbff1) 0 (mbff0) 0 by selmb3 (mbff1) 0
1996 nov 22 9 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.6 interrupts external, i 2 c-bus/derivative and timer/event counter interrupts are handled by the PCF84CXXXA family. the interrupt mechanism is single level, i.e. an executing interrupt routine cannot be pre-empted unless by reset. further interrupt requests are latched. if several interrupt requests are detected simultaneously, they are honoured according to their priority: external interrupt (highest priority) i 2 c-bus/derivative interrupt timer/event counter interrupt (lowest priority). an interrupt request is only sensed if the corresponding enable flag is set (see fig.7). when the request is honoured, the contents of the program counter and bits 4, 6 and 7 of the program status word are saved on the program counter stack. the program counter is loaded with the appropriate interrupt vector, thereby indicating the beginning of the interrupt routine. since the accumulator is not automatically saved, it must be saved and restored by user software. the interrupt routine must be terminated by the retr (return and restore) instruction. at least one instruction of the main program will then be executed before another interrupt routine is entered. to avoid erroneous real-time programs, a few words of caution: while the interrupt is in progress, the two most significant bits of the program counter are frozen at zero. thus, interrupt routines and subroutines called from interrupt routines must reside entirely in bank 0. the sel mb instruction must not be used in interrupt routines and in subroutines called from interrupt routines. otherwise, the changed contents of mbff0 and mbff1 (see fig.6) may lead to erroneous jmp and call destinations after return from interrupt. subroutines and nested subroutines called from the interrupt routine must all end with ret since retr clears the interrupt in progress flag (iip), as a side-effect (see figs 7 and 8). further pending interrupts would then interfere with the interrupt routine in progress. 6.6.1 e xternal interrupt a high-to-low transition on the int/t0 pin is latched in the digital filter/latch if the low state exceeds 7 clock periods after a high state of more than 4 clock periods. if the external interrupt is enabled the external interrupt flag (eif) is also asserted, thus constituting a valid external interrupt request. as soon as the iip is clear, indicating that no interrupt routine is in progress, the external interrupt is invoked by a forced call to location 3. the eif is simultaneously cleared (see figs 7 and 8). the interrupt routine may acknowledge the interrupt via port lines. execution of a dis i (disable external interrupt) instruction cancels a stored interrupt request by clearing both the digital filter/latch and the eif. 6.6.1.1 interrupt/test 0 ( int/t0) the int/t0 input has two purposes: external interrupt input test 0 input. when used as a test 0 input (external interrupt disabled) the conditional branch instruction jt0 will cause a jump if int/t0 = 1. the conditional branch instruction jnt0 will also cause a jump if int/t0 = 0. if int/t0 is not used, it must be tied to v dd or v ss . 6.6.2 i 2 c- bus /d erivative interrupt the i 2 c-bus/derivative interrupt is shared between the i 2 c-bus interface (if available) and the derivative logic (if available). software polling may be necessary to determine the origin of a request. an interrupt condition in the i 2 c-bus interface and/or the derivative logic will pull the pin line low. if the i 2 c-bus/derivative interrupt is enabled and no interrupt routine is in progress, the i 2 c-bus/derivative interrupt routine will be invoked by a forced call to program memory location 5. the i 2 c-bus/derivative interrupt routine must include instructions that will remove the cause of the i 2 c-bus/derivative interrupt and thus reset pin to its inactive high state (for further details see section 6.9). for derivative interrupts, consult the data sheet of the specific device. 6.6.3 t imer / event counter interrupt if the timer/event counter interrupt is enabled, a timer/event counter 1 overflow sets the timer interrupt flag (tif). as soon as iip is clear, meaning that no interrupt routine is in progress, the timer/event counter interrupt routine is invoked by a forced call to program memory location 7. the tif is simultaneously cleared (see figs 7 and 8). execution of a dis tcnti (disable timer/event counter interrupt) instruction cancels a stored interrupt request by clearing tif. the timer/event counter interrupt may also be used to simulate a second external interrupt. after an enable timer/event counter interrupt (en tcnti), the counter mode is enabled by a strt cnt instruction which loads ffh (the state preceding overflow) into the counter. a positive edge on the t1 pin will overflow the counter and set tif.
1996 nov 22 10 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family fig.7 simplified interrupt logic schematic (the r input overrules the s input for all flags). handbook, full pagewidth mba285 - 1 digital filter / latch ei enable sq r q clear eif reset clear sq r eif si enable sq r q ti enable sq r q sq r tif iip sq r q interrupt vector logic pin retr reset clear tif dis i int / t0 en i dis i reset en si dis si reset timer overflow en tcnt i dis tcnt i reset call ei / clear eif call si call ti / clear tif
1996 nov 22 11 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family fig.8 flow chart illustrating cpu control in the presence of interrupts. handbook, full pagewidth n y clear iip and return to main program reset en i? or en tcnt i? or en si? fetch instruction retr? n y enable relevant interrupt n y dis i? disable ei clear filter latch and eif dis si? disable si y nn y dis tcnt i? disable ti and clear tif execute instruction y n timer overflow? set tf ti enabled? n y set tif y n eif set? y n set filter latch filter latch set? y n iip set? n y ei enabled y n set eif clear filter latch yn iip set? pin = 0? y n n y si enabled? y n tif set? set iip clear tif set iip call 007 call 005 set iip clear eif call 003 mla695 int / to
1996 nov 22 12 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.7 timer/event counter 1 an internal 8-bit up counter is provided. the counter can be preset and read by the mov t, a and mov a, t instructions. when the counter is to be used in the timer mode, a strt t (start timer) instruction must be executed. depending on the ps bit in the program status word, the counter will increment every machine cycle (ps = 1, 1 30 f xtal ) or every 32 machine cycles (ps = 0, 1 960 f xtal ). strt t clears the prescaler (see fig.9) which is not otherwise accessible. to count external events a strt cnt (start event counter) instruction must be executed. a low-to-high transition on pin t1 is counted if the high state exceeds 4 clock periods after a low state of more than 4 clock periods. the maximum count rate is one increment per machine cycle ( 1 30 f xtal ). the timer mode and the event counter mode are both inhibited after reset or by executing a stop tcnt (stop timer/event counter) instruction (see fig.9). in both the timer and in event counter modes, overflow has two effects: if the timer/event counter interrupt is enabled tif is asserted thereby generating a timer/event counter interrupt request (see section 6.6). the timer flag (tf) is set. tf can be tested by conditional branch instructions jtf (jump if tf = 1) or jntf (jump if tf = 0). the jtf and jntf instruction, as a side-effect, reset tf. the only other way to clear tf is to reset the microcontroller. 6.7.1 t est 1/ count input (t1) the t1 input has two purposes: count input of 8-bit timer/event counter 1 (see section 6.7) test 1 input. when used as a test 1 input the conditional branch instruction jt1 will cause a jump if t1 = 1. the conditional branch instruction jnt1 will also cause a jump if t1 = 0. if t1 is not used, it must be tied to v dd or v ss . fig.9 timer/event counter 1. handbook, full pagewidth mba294 edge detector 8-bit timer / event counter t1 a b c mov t, a mov a, t ps = 1 ps = 0 a: strt t b: strt cnt c: stop tcnt sq r tf sq r tif timer overflow jtf, jntf conditional branch logic interrupt logic strt t f xtal prescaler 32 . . clear clear reset reset 30
1996 nov 22 13 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.8 parallel ports three standard quasi-bidirectional i/o ports are defined: port 0: parallel port of 8 lines (p0.0 to p0.7) port 1: parallel port of 8 lines (p1.0 to p1.7) port 2: parallel port of 4 lines (p2.0 to p2.2, sda/p2.3). several members of the PCF84CXXXA family provide all 20 port lines. the eight port 0 lines (p0.0 to p0.7) are available as a minimum. in addition to the standard ports, many PCF84CXXXA microcontrollers offer a variety of derivative ports. please consult the data sheet of the specific device. in general, all parallel ports can be used as either inputs or outputs. output data written to a port is latched and remains unchanged until rewritten. if the port is used as an input, the external data is not latched and must remain stable until it is accessed by the cpu. the standard port configuration is illustrated in fig.11. when a logic 0 is written to the master/slave flip-flop, tr2 and tr3 are both in the off condition. tr1 turns on and drives the output to v ss . when a logic 1 is written to the master/slave flip-flop, tr1 turns off. tr2 and tr3 both turn on driving the output rapidly to v dd . tr2 remains in the on condition for the duration of the write pulse only. the constant current source is responsible for keeping the output line high. sufficient source current is available for a ttl load high level; the line can, however, be overridden by an external device. this is used when the port line serves as an input, but it may also be useful for wired-or applications. in the latter case, unnecessary current through external devices is avoided since repeated logic 1 write operations will not activate tr2. the booster transistor tr2 is only asserted during a low-to-high transition of the master/slave flip-flop. if the port line is to be used as an input, a logic 1 should first be stored in the master/slave flip-flop to turn tr1 off. access to ports 0, 1 and 2 is provided by the parallel input/output instructions in, outl, anl and orl. in inputs port data to the accumulator. outl outputs accumulator data to the port. anl and orl are used for data manipulation in the port flip-flop. in contrast to ports 0, 1 and 2, derivative ports are accessed by the derivative input/output instructions mov, anl and orl. anl and orl are used for data manipulation in the port flip-flop. mov is used for all data transfers between port and accumulator. the source data for the accumulator can be loaded from either the port line or the port flip-flop. two derivative addresses are therefore provided per port (see table 2). all standard and derivative port accesses are performed by two-cycle instructions. their instruction timing is shown in fig.11. for input, data on port lines is sensed during timeslots 3 and 4 of machine cycle 2 (see sections 6.10 and 6.11). for output, the data change occurs in timeslot 7. for outl, data changes during machine cycle 1. for anl, orl and mov dx, a, data changes during machine cycle 2. table 2 derivative port address pair three mask-programmable options for port output configuration are available: option 1 standard port ; quasi-bidirectional i/o with switched pull-up current source of 100 m a (typ.) and p-channel booster transistor tr2. tr2 is only active for 1 clock cycle during low-to-high transitions (see fig.11). option 2 open-drain ; quasi-bidirectional i/o with only an n-channel open drain output. application as an output requires connection of an external pull-up resistor (see fig.12). if unused, an option 2 output should be tied to v ss . this keeps the input path from floating, thereby avoiding undesirable current flow through input stages. option 3 push-pull ; drive capability of the output will be 5 ma (typ.) at v dd = 3 v in both polarities. since short circuit currents would flow during input, push-pull lines must only be used as outputs (see fig.13). if available, sda/p2.3 is shared between the i 2 c-bus interface and the parallel port 2. therefore, only the open-drain configuration is permitted for sda/p2.3. for the remaining standard port lines (p0.0 to p2.2), all three options are generally available. besides port output mask options, the port flip-flop state, after reset, may be specified for each individual port line (except sda/p2.3). usually the set option will be selected, which avoids short-circuits for ports intended as inputs. however, there may be cases in which the port should output a logic zero after reset. the user may then specify the reset option for certain port lines. address type access 8-bit line address r derivative port line 8-bit ?ip-?op address r/w derivative port ?ip-?op
1996 nov 22 14 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family fig.10 input /output timing of standard and derivative ports. handbook, full pagewidth 1234567891012345678910 cycle 1 data in data out time slot p0, p1, p2, dx cycle 2 data out p0, p1, p2 p0, p1, p2, dx in a, p p outl p , a p anl p , #data, orl p , #data anl dx, a, orl dx, a mov dx, a (flip-flop address) p p mla615 fig.11 standard output with switched current source. handbook, full pagewidth mla696 tr3 i/o port line slave d sq sq master d mq write pulse outl / orl / anl / mov data bus orl / anl / mov in / mov tr1 v ss tr2 v dd constant current source 100 m a typ.
1996 nov 22 15 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family fig.12 open drain output. handbook, full pagewidth mla697 i/o port line slave d sq sq master d mq write pulse outl / orl / anl data bus orl / anl in tr1 v ss v dd fig.13 push-pull output. handbook, full pagewidth mla698 i/o port line slave d sq master d mq write pulse outl / orl / anl data bus orl / anl in tr1 v ss tr2 v dd
1996 nov 22 16 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.9 i 2 c-bus interface many members of the PCF84CXXXA family have a serial i/o interface - the i 2 c-bus or inter-integrated circuit bus. this two-line serial bus extends the microcontroller capabilities when implemented with the powerful i 2 c-bus devices. details of these devices can be found in data handbook ic12, i 2 c peripherals . microcontrollers that do not have a i 2 c-bus interface can simulate it by software, by using port pins. however, such microcontrollers must continuously monitor the serial bus. as well as degrading the maximum data transfer rate, this approach may also consume significant processing and memory resources. if available, however, the i 2 c-bus interface detects the valid 7-bit i 2 c-bus address of the device, transfers serial data and provides data conversion to and from parallel format, all without disrupting program execution. when a complete byte has been transferred, an interrupt is requested by which the next data byte can be written to or read out of the i 2 c-bus interface. the i 2 c-bus interface also facilitates the implementation of multimaster systems in which two or more microcontrollers communicate via the same i 2 c-bus. an automatic arbitration procedure resolves bus conflicts. the i 2 c-bus consists of a bidirectional clock line (scl) and a bidirectional data line (sda). whereas scl uses the dedicated pin sclk, sda and port line p2.3 share the pin, sda/p2.3. when the i 2 c-bus interface is enabled, sda/p2.3 is disabled as a port line. input signals on sclk and sda are filtered for enhanced noise immunity. when used as outputs, sclk and sda/p2.3 require an external pull-up resistor because they are open drain. if unused, sclk and sda/p2.3 should be tied to v ss (see section 6.8, option 2, open-drain output). communication between cpu and i 2 c-bus interface is handled through the four i 2 c-bus interface registers s0, s0, s1 and s2 (see fig.14). a detailed description of the i 2 c-bus specification, with applications, is given in the brochure the i 2 c-bus and how to use it . this brochure may be ordered using the code 9398 393 40011. data handbook ic12, i 2 c peripherals also contains this information, and data on all current i 2 c-bus slave devices. 6.9.1 d ata shift register (s0) the data shift register converts serial data to a parallel format and vice versa. the leading bit of a serial transfer corresponds to the most significant bit of the parallel word. an interrupt request is issued after transfer of a complete byte and after detection of the valid i 2 c-bus address. register s0 is read by mov a, s0. it is written by mov s0, a or mov s0, #data if the eso (enable serial i/o) bit in the status register (s1) is set. 6.9.2 a ddress register (s0) the address register contains the 7-bit i 2 c-bus address of the device and the als (always selected) bit. when als is zero, which is the recommended mode of operation, bus transfers are ignored unless the valid device address immediately follows the start condition. besides the stored 7-bit address, the general call address (pre-defined as zero) is also acceptable as a valid address. if als is set, however, any transfer on the bus will be stored in the data shift register. the address register s0 is write-only. it can be written by mov s0, a and mov s0, #data if the eso (enable serial i/o) bit in the status register (s1) is zero. 6.9.3 c lock control register (s2) the clock control register defines the frequency of f sclk as the microcontroller clock frequency divided by an integer (see table 3). it also defines asc (asymmetrical clock) and ack (acknowledge). if asc = 1, the generated sclk has a duty cycle of approximately 75%. the asymmetrical clock limits the i 2 c-bus transmission rate to below 55 khz. divisors 39, 45 and 51 are not allowed if asc = 1. however, an sclk duty cycle of approximately 50% results if asc = 0. this permits i 2 c-bus transmission rates of up to 100 khz. all divisors of table 3 are available. it is, therefore, recommended to select asc = 0. for the normal i 2 c-bus protocol ack must be set. after each byte transfer an extra sclk pulse is generated during which the receiver may acknowledge reception. if ack is zero, no acknowledge phase is available. this mode is temporarily used when a master/receiver refuses the acknowledgement in order to signal an end of transmission to the slave transmitter (see section 6.9.4.9). the clock control register (s2) is write-only. it can be written by mov s2, a and mov s2, #data.
1996 nov 22 17 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family fig.14 block diagram of the i 2 c-bus interface. d book, full pagewidth mla699 internal bus arbitration and synchronization logic a6 a5 a4 a3 a2 a1 a0 als lsb address register s0' msb address comparator lsb d0 d1 d2 d3 d4 d5 d6 d7 msb sda/p2.3 digital filter digital filter clock generator sclk msb eso x ack asc cc4 cc3 cc2 cc1 cc0 lsb clock control register s2 status register s1 lsb bc0 lrb bc1 bc2 aas al ad0 pin bb trx mst msb 8 8 8 8 8 8 7 7 data shift register s0
1996 nov 22 18 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family table 3 f sclk as de?ned by clock control register (s2) note 1. not permitted; maximum f sclk = 100 khz in i 2 c-bus systems. cc4 to cc0 (hex) f xtal divisor (division factor) f sclk (khz) at f xtal = 3.58 mhz f xtal = 10 mhz f xtal = 16 mhz 00 forbidden --- 01 39 91.8 256.4 (1) 410.3 (1) 02 45 79.5 222.2 (1) 355.6 (1) 03 51 70.2 196.1 (1) 313.7 (1) 04 63 56.8 158.7 (1) 254.0 (1) 05 75 47.7 133.3 (1) 213.3 (1) 06 87 41.1 114.9 (1) 183.9 (1) 07 99 36.2 101.0 (1) 161.6 (1) 08 123 29.1 81.3 130.1 (1) 09 147 4.4 68.0 108.8 (1) 0a 171 20.9 58.5 93.6 0b 195 18.4 51.3 82.1 0c 243 14.7 41.2 65.8 0d 291 12.3 34.4 55.0 0e 339 10.6 29.5 47.2 0f 387 9.2 25.8 41.3 10 483 7.4 20.7 33.1 11 579 6.2 17.3 27.6 12 675 5.3 14.8 23.7 13 771 4.6 13.0 20.8 14 963 3.7 10.4 16.6 15 1155 3.1 8.7 13.9 16 1347 2.7 7.4 11.9 17 1539 2.3 6.5 10.4 18 1923 1.9 5.2 8.3 19 2307 1.6 4.3 6.9 1a 2691 1.3 3.7 5.9 1b 3075 1.2 3.3 5.2 1c 3843 0.9 2.6 4.2 1d 4611 0.8 2.2 3.5 1e 5379 0.7 1.9 3.0 1f 6147 0.6 1.6 2.6
1996 nov 22 19 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.9.4 s tatus r egister (s1) the status register controls the i 2 c-bus interface and provides feedback concerning on-going bus transfers. register s1 can be accessed by mov a, s1; mov s1, a and mov s1, #data. the lower nibble of the status register is twofold: control bits bc0, bc1, bc2 and eso can only be written, whereas feedback bits lrb, ad0, aas and al can only be read. table 4 describes the status bits. the status bits interact in intricate ways with each other. this must be kept in mind when an i 2 c-bus application is programmed. 6.9.4.1 master bit (mst) and transmitter bit (trx) mst and trx together define the state of the i 2 c-bus interface. when not engaged in a bus transfer mst and trx should always be at zero, the slave/receiver state (see fig.15). return to this state is always performed by software. if the previous state was the master state, the transition (to slave/receiver by mov1, #d8h) involves a stop condition which, as a consequence, clears both mst and trx. the transition to the master/transmitter state is also a programmed event. however, transitions to the master/receiver and the slave/transmitter states occur automatically if als = 0 (standard i 2 c-bus protocol). a slave/receiver becomes a slave/transmitter if r/ w = 1 in its valid address (following the start condition). a master/transmitter becomes a master/receiver if r/ w=1 in the transmitted address. 6.9.4.2 pending interrupt not bit (pin) if mst = 1 or, if als = 1, pin is set to zero after every byte transfer. conversely, pin becomes zero when a valid address is detected and after each byte of the following transfer. in addition, the serial interrupt request, pin = 0 initiates clock synchronization, i.e. the sclk line is pulled to v ss as long as pin = 0. with this feature a slave may slow down a master, thus providing time to read the data register (in the case of a slave/receiver) or to write to the data register (in the case of a slave/transmitter). pin is cancelled by an access to register s0 or by explicitly setting pin to one. if the i 2 c-bus/derivative interrupt is disabled, the i 2 c-bus interface may be serviced by testing pin directly in user software. 6.9.4.3 bus busy bit (bb) the bus busy bit (bb) is controlled by the i 2 c-bus interface or by software in the bus master to generate the start and stop conditions. when a master clears bb (by mov s1, #d8h), the i 2 c-bus interface automatically clears mst and trx, thereby returning to the slave/receiver state (see fig.15). if bb = 1, write access to s1 is inhibited, except for the master or an addressed slave. should bb be inadvertently set by excessive noise on the bus, the deadlock can be resolved by two consecutive mov s1, #18h, the first of which just clears bb. when a slave/transmitter detects an end of transmission (signalled by the lack of an acknowledgment from the master receiver), it has to access s1 in order to cancel pin and to become slave/receiver. however, bb should remain set. this is reflected by mov s1, #38h as illustrated in fig.15. with pin = 1, clock synchronization terminates, enabling the master to generate the stop condition. a start condition must only be generated when bb = 0; otherwise the i 2 c-bus interface will respond as if bus arbitration has been lost (see section 6.9.4.4). 6.9.4.4 arbitration lost bit (al) the al bit is set by the i 2 c-bus interface when it loses a bus arbitration in the master/transmitter mode. mst and trx are cleared simultaneously to enable the interface, now in slave/receiver mode, to determine if it is validly addressed by the device that won the arbitration. pin is activated when the byte transfer is complete. al will be cleared when the serial interrupt is cancelled. 6.9.4.5 addressed as slave bit (aas) aas is set by the i 2 c-bus interface following a start condition when the valid address is detected (als = 0 in register s0) or when the first byte is received (als = 1 in register s0). aas is cleared when the serial interrupt is cancelled. 6.9.4.6 address zero bit (ad0) ad0 is set, independently of als, by the i 2 c-bus interface when byte 00h, the 'general call' address, is detected following a start condition. ad0 is cleared after a repeated start or a stop condition.
1996 nov 22 20 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.9.4.7 last received bit (lrb) lrb corresponds to the last bit transferred. if ack = 1, lrb contains the acknowledgement bit. it remains valid as long as pin = 0. 6.9.4.8 enable serial i/o bit (eso) when eso = 0 access to register s0' is enabled. sclk is in the high-impedance state and sda/p2.3 is available as a normal port line. when eso = 1 the i 2 c-bus interface and access to register s0 is enabled. only when eso = 1 may the other bits of register s1 be changed. sclk and sda/p2.3 are enabled as serial clock and data lines, respectively. to avoid bus deadlock, eso must be set to zero prior to the execution of the stop instruction. 6.9.4.9 bit counter bits (bc0, bc1 and bc2) the bit counter bits bc0, bc1 and bc2 should all be at zero for normal i 2 c-bus operation. the bit counter is always cleared by a start condition. therefore, all eight bits of the first byte are transferred. if a non-zero bit counter value is chosen, it is only valid for one register s0 transfer since the counter decrements to zero. an important use of the bit counter arises when a master/receiver signals an end of transmission by sending a negative acknowledge after the last byte received. to do this, the last byte is received with bit ack = 0 in register s2. the negative acknowledge is then issued by setting the bit counter to one and receiving one bit from the high level available on the sda line. the slave/transmitter interprets the same signals as a negative acknowledgement. table 4 overview of status register bits bit name type description mst master r/w mst = 0: slave (sclk input). mst = 1: master (sclk output). trx transmitter trx = 0: receiver (sda/p2.3 input. trx = 1: transmitter (sda/p2.3 output). bb bus busy r/w bb = 0: bus inactive (r)/generates stop condition (w). bb = 1: bus busy (r)/generates start condition (w). pin pending interrupt not r/w pin = 0: serial interrupt pending (after byte transfer, valid address or lost arbitration). sclk line forced to v ss . pin = 1: no serial interrupt pending. eso enable serial output w eso = 0: i 2 c-bus interface disabled/write access to s0' possible. eso = 1: i 2 c-bus interface enabled write access to s0 possible. bc0 to bc2 bit counter 0 to 2 w 3-bit binary value of 0 to 7, counting down the number of bits transferred (0 used for complete byte). al arbitration lost r set: when a bus con?ict is lost. reset: when corresponding serial interrupt (pin) is cancelled. aas addressed as slave r set: following a start condition if valid address is detected (als = 0) or if ?rst byte is received (als = 1). reset: when corresponding serial interrupt (pin) is cancelled. ad0 address zero r set: following a start condition if byte 00h (general call address) is detected. reset: after a repeated start or a stop condition. lrb last received bit r set or reset depending on the value of the last bit transferred, acknowledgement bit if ack = 1.
1996 nov 22 21 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family handbook, full pagewidth mba298 - 1 master transmitter master receiver slave receiver slave transmitter mov si, #d8h mov si, #f8h mov si, #38h (r/w = 1) and (als = 0) (r/w = 1) and (als = 0) programmed transition automatic transition mov si, #d8h fig.15 state diagram of the i 2 c-bus interface. 6.10 timing every machine cycle consists of 10 time slots which are again subdivided into 3 clock periods each (see fig.16). permitted clock frequencies range from 1 mhz to a maximum, which is a function of the supply voltage. at v dd 3 4.5 v, a 16 mhz maximum clock frequency is guaranteed. the clock signal may be internally generated by an on-chip oscillator. alternatively, an external clock may be applied to pin xtal1. in this configuration, a short circuit with an internal pull-up transistor on xtal1 may occur while the oscillator is inhibited (see section 6.11). care should be taken to avoid excessive current flow. fig.16 timing of a machine cycle. handbook, full pagewidth mba296 1 2 3 4 5 6 7 8 9 10 machine cycle 10 time slots 30 clock periods
1996 nov 22 22 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.11 oscillator the on-chip oscillator basically consists of an inverter stage which includes a feedback resistor and load capacitors (see fig.17). in most applications, a quartz crystal will be connected between xtal1 and xtal2. alternatively, a ceramic resonator or an inductor may be used as a timing element. when the supply voltage drops below the power-on reference level, the oscillator is inhibited. the internal oscillator can also be inhibited by the stop instruction under software control (see section 6.13.2 ). the transconductance (g m ) of the inverter stage can be mask-programmed, thereby optimizing the oscillator for a specific frequency and resonator. three standard transconductance options, referred to as low, medium and high, can be specified by the user. with c 1 =c 2 = 10 pf on-chip, external capacitors are not required for quartz oscillators. however, for adequate frequency stability, pxe resonators need external capacitors in the order of the static resonator capacitance c 0 , such as external c 1 =c 2 = 30 to 100 pf. oscillator start-up time depends mainly on the external timing element. the start-up time of a quartz crystal is several milliseconds because of the narrow crystal bandwidth. for proper oscillator start-up, the transconductance (g m ) of the inverter stage must fulfil relationship (1); shown below. table 5 notation to relationship (see figs 17 and 18) symbol definition r x resonator series resistance c 0 static resonator capacitance r 0 resonator loss resistance r p r 0 // r f r f feedback resistor c l c1 c2/(c1 + c2) (load capacitance) c f parasitic feedback capacitance (typically 2 pf on-chip, external value depends on printed-circuit board wiring) w 2 p f osc fig.17 oscillator with integrated elements. mla614 r f c1 c2 xtal1 xtal2 g m inhibit c f fig.18 crystal unit equivalent circuit. handbook, halfpage mba295 - 1 c l c 0 symbol r x x x r 0 (1) 4.2 r x w 2 c l c 0 c f ++ () 2 1 r p ------- + g m c1 c2 r x c 0 c f + () 2 1 w 2 r p -------------- + ------------------------------------------------------------------ <<
1996 nov 22 23 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.12 reset to ensure proper start-up, the microcontroller must be initialized to a defined starting condition. the device executes the first instruction 1866 clock cycles after the falling edge of the internal reset. 6.12.1 p assive external reset a passive reset is generated by the rc circuit illustrated in fig.19. while v dd rises, the discharged c reset keeps the reset pin near the v dd level. when v dd crosses the power-on reference level (v ref ) the power-on reset circuit generates a reset pulse of approximately 50 m s. this pulse is without effect since it feeds into the reset signal forced by the one on the reset pin. the f xtal dependent minimum v dd must be reached before the voltage on reset drops below v ih = 0.7v dd . this translates into a lower bound for c reset r reset equal to twice the rise time of v dd (for linearly rising v dd ) or eight times the time constant of v dd (for exponentially rising v dd ). the internal diode rapidly discharges c reset when v dd falls off, ensuring reliable reset even after short interruptions of supply voltage. to avoid overload of the internal diode, an external diode should be added in parallel if c reset > 2.2 m f. 6.12.2 a ctive external reset an active reset can be generated by driving the reset pin high from an external logic device. such an active reset pulse should not fall off before v dd has reached its f xtal dependent minimum operating value. handbook, full pagewidth mla700 reset v dd power-on-reset oscillator inhibit ? 50 m s internal reset c reset v por r reset 100 k w fig.19 passive external reset
1996 nov 22 24 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.12.3 i nternal reset in systems where v dd reaches its f xtal dependent minimum operating value before the clock f xtal is applied, reset can be performed without external components. this condition is generally fulfilled with quartz and pxe resonators since oscillator start-up takes several milliseconds. besides, rapid power-up is usually available in battery-powered systems. if the internal power-on reset is used the reset pin should be connected to v ss . when v dd increases above the power-on reference level v ref , the power-on-reset circuit generates a reset pulse of approximately 50 m s. this pulse guarantees proper initialization under the conditions defined above. the power-on reference level v ref is a mask option. the user can select a reference voltage between 1.2 v and 3.6 v in discrete steps of 100 mv. the accuracy of the reference voltage is 500 mv for the v ref range 1.2 v to 3.0 v and 800 mv for the v ref range 3.1 v to 3.6 v. the chosen v ref should have sufficient margin regarding the minimum intended v dd . a mask option without an internal power-on reset circuit is also available. it is recommended if the user does not intend to use the internal power-on-reset circuit. in this case, the supply current requirements in stop mode (see section 6.13.2) will reduce to the level of leakage currents, i.e. virtually zero at ambient temperature. 6.12.4 r eset state after a reset, the device state is characterized as follows: program counter 0 memory bank 0 register bank 0 - stack pointer 0 (location pair 8 and 9) all interrupts disabled timer/event counter 1 stopped and cleared timer prescaler modulo-32 (ps = 0) timer flag cleared all port flip-flops (except sda/p2.3) set to 1 (set option) or 0 (reset option) as selected by the user sda/p2.3 is high-impedance with the port flip-flop set to 1 sclk is high-impedance i 2 c-bus interface disabled (eso = 0) and in slave/receiver mode (s0, s0, s1 and s2 cleared except for pin = 1) idle and stop modes cancelled.
1996 nov 22 25 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.13 reduced power modes 6.13.1 i dle mode the idle mode is very useful in low-power applications. when all computational tasks are completed, the device can be put into standby instead of into a busy waiting loop. nevertheless, the device is on the alert and ready to respond rapidly to any interrupt. the microcontroller enters the idle mode via the idle instruction. in the idle mode, all activity is halted except for the oscillator, the timer/event counter 1 and the i 2 c-bus interface (if available). the microcontroller leaves the idle mode when an enabled interrupt occurs. the interrupt routine is executed before operation resumes with the instruction following the idle opcode. for timer/event counter interrupts and i 2 c-bus/derivative interrupts, termination of the idle mode is straightforward. however, care must be taken when the idle mode is left by the external interrupt since int/t0 is negative-edge responding. if int/t0 was low prior to entering the idle mode, it must be taken high before the negative edge can be generated. figure 20 specifies the exact timing for leaving the idle mode via the external interrupt int/t0. if no interrupt is enabled, the idle mode can only be terminated by an active signal on the reset pin. a normal reset sequence is executed (see fig.20). fig.20 entering and leaving the idle mode. handbook, full pagewidth xtal2 idle normal mode program flow normal mode program counter = 0 or 003h idle mode int/t0 mla702 or t reset 1 m s 1866 clock periods reset 4 clock periods 760 clock periods clock periods (pc) = 0003h (pc) = 0000h
1996 nov 22 26 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.13.2 s top mode the stop mode allows very low-power applications. when all computational tasks are completed, the device can be almost completely shut off by stopping its oscillator. in contrast to the idle mode, the device is not ready to respond rapidly to any interrupt. the microcontroller enters the stop mode via the stop instruction. the oscillator is switched off. all internal states and i/o levels are maintained. the microcontroller leaves the stop mode by a low level on int/t0 or a reset. in the latter case, a normal reset sequence is executed (see fig.21). in contrast to the idle mode and the external interrupt mechanism, the microcontroller responds to a low level on int/t0 rather than to a negative edge. if int/t0 is low when the stop instruction is executed, the stop mode will not be entered. a negative edge on int/t0 continues program execution after a 1866 clock cycle delay, which ensures proper oscillator start-up. if the external interrupt is enabled, the device executes the instruction following the stop opcode before diverting to the interrupt routine. if the external interrupt is disabled, program execution continues with the instructions following the stop opcode (see fig.21). fig.21 entering and leaving the stop mode. handbook, full pagewidth mla701 xtal2 t int 1 m s 1866 clock periods stop normal mode program flow reset or int/t0 normal mode stop mode t 1 m s reset (pc) = address following stop don't care (pc) = 0000h 1866 clock periods
1996 nov 22 27 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 6.14 derivative logic derivative logic is provided with many members of the PCF84CXXXA family. the detailed description of the derivative circuitry is given in the data sheet of the specific device. in this section, the shared principles of derivative logic are briefly reviewed. derivative registers are accessed over the internal bus. the derivative registers are write-only, read-only or read/write (see fig.22). they are addressed through the derivative address register when the derivative input/output instructions (mov a, dx; mov dx, a; anl dx, a and orl dx, a) are executed. derivative interrupts share the line pin with the i 2 c-bus interrupt (if available). when the derivative interrupt routine is executed, the pin line must be de-activated by software. table 6 summary of mask options feature option description rom any mix of instructions program; size restricted by rom size (see tables 7 and 8) ports option 1 standard output (see fig.11) option 2 open drain output (see fig.12) option 3 push-pull output (see fig.13) set ?ip-?op at logic 1 after reset reset ?ip-?op at logic 0 after reset oscillator g ml low transconductance g mm medium transconductance g mh high transconductance handbook, full pagewidth mba297 8 256 pin derivative interrupt logic derivative read / write register derivative read register derivative write register derivative address register decoder 8 8 8 8 internal bus fig.22 block diagram of derivative logic.
1996 nov 22 28 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 7 instruction set the PCF84CXXXA instruction set consists of over 100 one and two-byte instructions. program code efficiency is high because all ram locations and all rom locations on a 256-byte page require only a single-byte address. table 8 lists the symbols that are used in table 7 and the instruction map is shown in section 7.1. table 7 PCF84CXXXA family instruction set mnemonic opcode (hex) bytes/ cycles description function notes accumulator add a, rr (1) 6<8 + r> 1/1 add register contents to a (a) ? (a) + (rr) r = 0 to 7 add a, @rr (1) 6r 1/1 add ram data, addressed by rr, to a (a) ? (a) + ((rr)) r = 0, 1 add a, #data (1) 03 data 2/2 add immediate data to a (a) ? (a) + data addc a, rr (1) 7<8 + r> 1/1 add carry and register contents to a (a) ? (a) + (rr) + (c) r = 0 to 7 addc a, @rr (1) 7r 1/1 add carry and ram data, addressed by rr, to a (a) ? (a) + ((rr)) + (c) r = 0, 1 addc a, #data (1) 13 data 2/2 add carry and immediate data to a (a) ? (a) + data + (c) anl a, rr 5<8 + r> 1/1 and rr with a (a) ? (a) and (rr) r = 0 to 7 anl a, @rr 5r 1/1 and ram data addressed by rr, with a (a) ? (a) and ((rr)) r = 0, 1 anl a, #data 53 data 2/2 and immediate data with a (a) ? (a) and data orl a, rr 4<8 + r> 1/1 or rr with a (a) ? (a) or (rr) r = 0 to 7 orl a, @rr 4r 1/1 or ram data, addressed by rr, with a (a) ? (a) or ((rr)) r = 0, 1 orl a, #data 43 data 2/2 or immediate data with a (a) ? (a) or data) xrl a, rr d<8 +r> 1/1 xor rr with a (a) ? (a) xor (rr) r = 0 to 7 xrl a, @rr dr 1/1 xor ram data, addressed by rr, with a (a) ? (a) xor ((rr)) r = 0, 1 xrl a, #data d3 data 2/2 xor immediate data with a (a) ? (a) xor data) inc a 17 1/1 increment a by 1 (a) ? (a) + 1 dec a 07 1/1 decrement a by 1 (a) ? (a) - 1 clr a 27 1/1 clear a to zero (a) ? 0 cpl a 37 1/1 ones complement a (a) ? not(a) rl a e7 1/1 rotate a left (a n +1 ) ? (a n ), (a 0 ) ? (a 7 ) n = 0 to 6 rlc a (2) f7 1/1 rotate a left through carry (a n +1 ) ? (a n ), (a 0 ) ? (c), (c) ? (a 7 ) n = 0 to 6 rr a 77 1/1 rotate a right (a n ) ? (a n +1 ), (a 7 ) ? (a 0 ) n = 0 to 6 rrc a (2) 67 1/1 rotate a right through carry (a n ) ? (a n + 1 ), (a 7 ) ? (c), (c) ? (a 0 ) n = 0 to 6 da a (2) 57 1/1 decimal adjust a (a) ? (a) + 06h if ac = 1 or (a 0-3 )>9; (a) ? (a) + 60h if (a 4-7 )>9 swap a (2) 47 1/1 swap nibbles of a (a 4-7 ) ? (a 0-3 )
1996 nov 22 29 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family data moves mov a, rr f<8 + r> 1/1 move register contents to a (a) ? (rr) r = 0 to 7 mov a, @rr fr 1/1 move ram data addressed by rr, to a (a) ? ((rr)) r = 0, 1 mov a, #data 23 data 2/2 move immediate data to a (a) ? data mov rr, a a<8 + r> 1/1 move accumulator contents to register (rr) ? (a) r = 0 to 7 mov@rr, a ar 1/1 move accumulator contents to ram location addressed by rr ((rr)) ? (a) r = 0, 1 mov rr, #data b<8 + r> data 2/2 move immediate data to rr (rr) ? data r = 0 to 7 mov @rr, #data br data 2/2 move immediate data to ram location addressed by rr ((r0)) ? data r = 0, 1 xch a, rr 2<8 + r> 1/1 exchange a contents with rr (a) ? (rr) r = 0 to 7 xch a, @rr 2r 1/1 exchange accumulator contents with ram data addressed by rr (a) ? ((rr)) r = 0, 1 xchd a, @rr 3r 1/1 exchange lower nibbles of a and ram data addressed by rr (a 0-3 ) ? ((rr 0-3 )) r = 0, 1 mov a, psw c7 1/1 move psw contents to accumulator (a) ? (psw) mov psw, a (3) d7 1/1 move accumulator bit 3 to psw 3 (ps) (ps) ? (a 3 ) mov p a, @a a3 1/2 move indirectly addressed data in current page to a (pc 0-7 ) ? (a), (a) ? ((pc)) carry flag clr c (2) 97 1/1 clear carry bit (c) ? 0 cpl c (2) a7 1/1 complement carry bit (c) ? not(c) register inc rr 1<8 + r> 1/1 increment register by 1 (rr) ? (rr) + 1 r = 0 to 7 inc @rr 1r 1/1 increment ram data, addressed by rr, by 1 ((rr)) ? ((rr)) + 1 r = 0, 1 dec rr c<8 + r> 1/1 decrement register by 1 (rr) ? (rr) - 1 r = 0 to 7 dec @rr cr 1/1 decrement ram data addressed by rr, by 1 ((rr)) ? ((rr)) - 1 r = 0, 1 mnemonic opcode (hex) bytes/ cycles description function notes
1996 nov 22 30 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family branch jmp addr <2n>4 addr 2/2 unconditional jump within a 2 kbyte bank (pc 8-10 ) ? n (pc 0-7 ) ? addr (pc 11-12 ) ? (mbff0-1) n = 0 to 7 jmpp @a b3 1/2 indirect jump within a page (pc 0-7 ) ? ((a)) djzn rr, addr e<8 + r> addr 2/2 decrement rr by 1 and jump if not zero to addr (rr) ? (rr) - 1; if (rr) not zero, then (pc 0-7 ) ? addr r=0to7 djnz @rr, addr er 2/2 decrement ram data, addressed by rr, by 1 and jump if not zero to addr ((rr)) ? ((rr)) - 1; if ((rr)) not zero, then (pc 0-7 ) ? addr r=0to1 jbb addr <2b + 1> 2 addr 2/2 jump to addr if accumulator bit b = 1 if (a b ) = 1, then (pc 0-7 ) ? addr b = 0 to 7 jc addr f6 addr 2/2 jump to addr if c = 1 if (c) = 1, then (pc 0-7 ) ? addr jnc addr e6 addr 2/2 jump to addr if c = 0 if (c) = 0, then (pc 0-7 ) ? addr jz addr c6 addr 2/2 jump to addr if a = 0 if (a) = 0, (pc 0-7 ) ? addr jnz addr 96 addr 2/2 jump to addr if a is not zero if (a) 1 0, then (pc 0-7 ) ? addr jt0 addr 36 addr 2/2 jump to addr if t0 = 1 if t0 = 1, then (pc 0-7 ) ? addr jnt0 addr 26 addr 2/2 jump to addr if t0 = 0 if t0 = 0, then (pc 0-7 ) ? addr jt1 addr 56 addr 2/2 jump to addr if t1 = 1 if t1 = 1, then (pc 0-7 ) ? addr jnt1 addr 46 addr 2/2 jump to addr if t1 = 0 if t0 = 0, then (pc 0-7 ) ? addr jtf addr (4) 16 addr 2/2 jump to addr if timer flag = 1 if tf = 1, then (pc 0-7 ) ? addr jntf addr (4) 06 addr 2/2 jump to addr if timer flag = 0 if t0 = 0, then (pc 0-7 ) ? addr mnemonic opcode (hex) bytes/ cycles description function notes
1996 nov 22 31 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family timer/event counter mov a,t 42 1/1 move timer/event counter contents to a (a) ? (t) mov t, a 62 1/1 move a contents to timer/event counter (t) ? (a) strt cnt 45 1/1 start event counter strt t 55 1/1 start timer stop tcnt 65 1/1 stop timer/event counter en tcnti 25 1/1 enable timer/event counter interrupt dis tcnti 35 1/1 disable timer/event counter interrupt control en i 05 1/1 enable external (chip enable) interrupt dis i 15 1/1 disable external (chip enable) interrupt sel rb0 (5) c5 1/1 select register bank 0 (rbs) ? 0 sel rb1 (5) d5 1/1 select register bank 1 (rbs) ? 1 sel mb0 (10) e5 1/1 select program memory bank 0 (mbff0) ? 0, (mbff1) ? 0 sel mb1 (10) f5 1/1 select program memory bank 1 (mbff0) ? 1, (mbff1) ? 0 sel mb2 (10) a5 1/1 select program memory bank 2 (mbff0) ? 0, (mbff1) ? 1 sel mb3 (10) b5 1/1 select program memory bank 3 (mbff0) ? 1, (mbff1) ? 1 stop 22 1/1 enter stop mode idle 01 1/1 enter idle mode subroutine call addr (6) <2n + 1> 4addr 2/2 jump to subroutine ((sp)) ? (pc) (psw 4,6,7 ), (sp) ? (sp) + 1, (pc 8-10 ) ? n, (pc 0-7 ) ? addr, (pc 11-12 ) ? (mbff0-1) n = 0 to 7 ret (6) 83 1/2 return from subroutine (sp) ? (sp) - 1, (pc) ? ((sp)) retr (6) 93 1/2 return from interrupt and restore bits 4, 6 and 7 of psw (sp) ? (sp) - 1, (psw 4,6,7 ) + (pc) ? ((sp)) mnemonic opcode (hex) bytes/ cycles description function notes
1996 nov 22 32 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family parallel input/output in a, p0 08 1/2 input port 0 data to accumulator (a) ? (p0) in a, p1 09 1/2 input port 1 data to accumulator (a) ? (p1) in a, p2 (7) 0a 1/2 input port 2 data to accumulator (a) ? (p2) outl p0, a 38 1/2 output a data to port 0 (p0) ? (a) outl p1, a 39 1/2 output a data to port 1 (p1) ? (a) outl p2, a 3a 1/2 output a data to port 2 (p2) ? (a) anl p0, #data 98 data 2/2 and port 0 data with immediate data (p0) ? (p0) and data anl p1, #data 99 data 2/2 and port 1 data with immediate data (p1) ? (p1) and data anl p2, #data 9a data 2/2 and port 2 data with immediate data (p2) ? (p2) and data orl p0, #data 88 data 2/2 or port 0 data with immediate data (p0) ? (p0) or data orl p1, #data 89 data 2/2 or port 1 data with immediate data (p1) ? (p1) or data orl p2, #data 8a data 2/2 or port 2 data with immediate data (p2) ? (p2) or data derivative input/output mov a, dx (8) 8c direct 2/2 move derivative register contents to a (a) ? (dx) x = 0 to 255 mov dx, a (8) 8d direct 2/2 move a contents to derivative register (dx) ? (a) x = 0 to 255 anl dx, a (8) 8e direct 2/2 and derivative register with a (dx) ? (dx) and (a) x = 0 to 255 orl dx, a (8) 8f direct 2/2 or derivative register with a (dx) ? (dx) or (a) x = 0 to 255 serial input/output (i 2 c-bus operations) mov a, s0 0c 1/2 move i 2 c-bus register 0 contents to a (a) ? (s0) mov a, s1 (9) 0d 1/2 move i 2 c-bus register 1 contents to a (a) ? (s1) mov s0, a 3c 1/2 move a contents to i 2 c-bus register 0 (s0) ? (a) mov s1, a (9) 3d 1/2 move a contents to i 2 c-bus register 1 (s1) ? (a) mov s2, a 3e 1/2 move a contents to i 2 c-bus register 2 (s2) ? (a) mov s0, #data 9c data 2/2 move immediate data to i 2 c-bus register 0 (s0) ? data mov s1, #data (9) 9d data 2/2 move immediate data to i 2 c-bus register 1 (s1) ? data mov s2, #data 9e data 2/2 move immediate data to i 2 c-bus register 2 (s2) ? data en si 85 1/1 enable serial i/o interrupt dis si 95 1/1 disable serial i/o interrupt nop 00 1/1 no operation (pc 0-10 ) ? (pc 0-10 ) + 1 mnemonic opcode (hex) bytes/ cycles description function notes
1996 nov 22 33 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family notes to table 7 1. psw cy, ac affected. 2. psw cy affected. 3. psw ps affected. 4. execution of a jtf or jntf instruction resets the timer flag (tf). 5. psw rbs affected. 6. psw sp 0 , sp 1 and sp 2 , affected. 7. (a) = 0000, p2.3, p2.2, p2.1 and p2.0. 8. for more information on the derivative i/o instructions of a particular microcontroller, consult the specific microcontroller data sheet. 9. (s1) has a different meaning for read and write operations. see section 6.9.4. 10. sel mb instructions may not be used within interrupt routines.
1996 nov 22 34 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family table 8 de?nitions of symbols used in table 7 symbol description a accumulator ac auxiliary (half) carry addr program memory address bb bit designation (b = 0 to 7) ce/t0 ce/t0 input cy carry bit dx mnemonic derivative register data 8-bit number or expression mb0 program memory bank 0 mb1 program memory bank 1 mb2 program memory bank 2 mb3 program memory bank 3 mbff0 memory bank ?ip-?op 0 mbff1 memory bank ?ip-?op 1 pc program counter ps timer prescaler select psw program status word rb0 register bank 0 rb1 register bank 1 rbs register bank select rr register designation (r = 0 to 7) spn stack pointer (n = 0, 1 or 2) t timer 1 t1 t1 input tf timer flag x derivative register address (x = 0 to 255) (x) contents of x ((x)) contents of location addressed by x ? is replaced by ? is exchanged with # immediate data pre?x @ indirect address pre?x * hexadecimal; 8...f selects r0...r7 & hexadecimal; 0, 2, 4, 6, 8, a, c, e selects page 0...7 in jmp, i.e. (pc 8-10 ) ?& 1-3 % hexadecimal; 1, 3, 5, 7, 9, b, d, f selects page 0...7 in call, i.e. (pc 8-10 )?& 1-3 selects bit b = 0...7 in jbb, i.e. b = & 1-3
1996 nov 22 35 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 7.1 instruction map handbook, full pagewidth mba281 first hexadecimal character of opcode second hexadecimal character of opcode 01 0 1 0 1 0 1 0 1 01 0 1 0 1 0 1 0 1 01 01 01 jb0 addr stop jb1 addr mov a, t jb2 addr mov t, a jb3 addr jb4 addr jb5 addr jb6 addr jb7 addr xrl a,#data jmpp @a movp a,@a retr ret anl a, #data orl a, #data mov a, #data addc a,#data add a, #data jmp page 0 en i jntf addr dec a call page 0 jmp page 1 call page 1 jmp page 2 call page 2 jmp page 3 call page 3 jmp page 4 call page 4 jmp page 5 call page 5 jmp page 6 call page 6 jmp page 7 call page 7 sel mb1 dis i en tcnti dis tcnti strt cnt strt t stop tcnt en si dis si sel mb2 sel mb3 sel rb0 sel rb1 sel mb0 jc addr jnc addr jz addr jnz addr jt1 addr jnt1 addr jt0 addr jnt0 addr jtf addr inc a clr a cpl a swap a da a rrc a rr a clr c cpl c mov a,psw mov psw,a rl a rlc a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 01 1 1 1 1 1 1 1 1 1 1 1 1 1 1 12 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 01 3 4567 34567 01 2 3 4567 3 4567 34567 34567 01 2 345 6 7 3 4567 3 3 3 34 4 4 45 5 5 56 6 6 67 7 7 7 mov a,dx mov dx,a anl dx,a orl dx,a 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 123456789abcdef nop idle xch a, @rr inc @ rr xchd a, @rr orl a, @rr anl a, @rr addc a, @rr add a, @rr mov @ rr,a mov @rr, #data dec @rr xrl a, @rr djnz @ rr,addr mov a, @rr in a,pp mov a,sn inc rr xch a,rr outl pp,a mov sn,a orl a,rr anl a,rr add a,rr addc a,rr orl pp,#data anl pp,#data mov sn,#data mov rr,a mov rr,#data dec rr xrl a,rr djnz rr,addr mov a,rr
1996 nov 22 36 philips semiconductors product speci?cation 8-bit microcontrollers PCF84CXXXA family 8 definitions 9 life support applications these products are not designed for use in life support appliances, devices, or systems where malfunction of these products can reasonably be expected to result in personal injury. philips customers using or selling these products for use in such applications do so at their own risk and agree to fully indemnify philips for any damages resulting from such improper use or sale. 10 purchase of philips i 2 c components data sheet status objective speci?cation this data sheet contains target or goal speci?cations for product development. preliminary speci?cation this data sheet contains preliminary data; supplementary data may be published later. product speci?cation this data sheet contains ?nal product speci?cations. limiting values limiting values given are in accordance with the absolute maximum rating system (iec 134). stress above one or more of the limiting values may cause permanent damage to the device. these are stress ratings only and operation of the device at these or at any other conditions above those given in the characteristics sections of the speci?cation is not implied. exposure to limiting values for extended periods may affect device reliability. application information where application information is given, it is advisory and does not form part of the speci?cation. purchase of philips i 2 c components conveys a license under the philips i 2 c patent to use the components in the i 2 c system provided the system conforms to the i 2 c specification defined by philips. this specification can be ordered using the code 9398 393 40011.


▲Up To Search▲   

 
Price & Availability of PCF84CXXXA

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X